package gov.fgn.sijyp.integracion.origen;

import gov.fgn.sijyp.general.data.Municipio;

import java.io.Serializable;

import javax.persistence.*;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import java.util.Date;

/**
 * The persistent class for the version database table.
 */
@Entity
@Table(name = "version", schema = "siijyp_integracion")
//@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Version implements Serializable {
  private static final long serialVersionUID = 1L;

  @Id
  @SequenceGenerator(name = "version_generator", sequenceName = "siijyp_integracion.version_idversion_seq")
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "version_generator")
  @Column(unique = true, nullable = false)
  private Integer idversion;

  private Boolean esmultiple;

  @Column
  private Long etapaproceso;

  @Temporal(TemporalType.DATE)
  @Column(nullable = false)
  private Date fechaversion;

  @ManyToOne
  @JoinColumn(name = "idmunicipio")
  private Municipio municipio;

  @ManyToOne
  @JoinColumn(name = "idsalaversion")
  private SalaVersion salaversion;

  @Column(length = 15)
  private String ip;

  @Column(length = 100)
  private String lugar;

  @Column(length = 10)
  private String usuario;

  public Version() {
  }

  public Version(SalaVersion salaversion) {
    this.salaversion = salaversion;
  }

  public Integer getIdversion() {
    return this.idversion;
  }

  public void setIdversion(Integer idversion) {
    this.idversion = idversion;
  }

  public Boolean getEsmultiple() {
    return this.esmultiple;
  }

  public void setEsmultiple(Boolean esmultiple) {
    this.esmultiple = esmultiple;
  }

  public Long getEtapaproceso() {
    return this.etapaproceso;
  }

  public void setEtapaproceso(Long etapaproceso) {
    this.etapaproceso = etapaproceso;
  }

  public Date getFechaversion() {
    return this.fechaversion;
  }

  public void setFechaversion(Date fechaversion) {
    this.fechaversion = fechaversion;
  }

  public String getIp() {
    return this.ip;
  }

  public void setIp(String ip) {
    this.ip = ip;
  }

  public String getLugar() {
    return this.lugar;
  }

  public void setLugar(String lugar) {
    this.lugar = lugar;
  }

  public String getUsuario() {
    return this.usuario;
  }

  public void setUsuario(String usuario) {
    this.usuario = usuario;
  }

  public SalaVersion getSalaversion() {
    return salaversion;
  }

  public void setSalaversion(SalaVersion salaversion) {
    this.salaversion = salaversion;
  }

  public Municipio getMunicipio() {
    return municipio;
  }

  public void setMunicipio(Municipio municipio) {
    this.municipio = municipio;
  }
}